﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Common;
using System.Configuration;

namespace LMIS_Application
{
    public class DbHelper
    {
        public static DbConnection GetDatabaseConnection()
        {
            ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings["LIMS_DB"];
            DbProviderFactory factory = DbProviderFactories.GetFactory(settings.ProviderName);
            DbConnection conn = factory.CreateConnection();
            conn.ConnectionString = settings.ConnectionString;
            return conn;
        }
    }
}
